import { type App } from 'vue'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 解决下拉选择框默认绑定值警告问题
import { ElOption } from 'element-plus';
(ElOption as any).props.value.type = null;

function importElementPlusIcons(app: App) {
  // 挂载所有图标
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
}

export {
  ElementPlus,
  importElementPlusIcons
}